#pragma once
#include "williamsmachine.h"

#define F_BONUSRAM		0x20			//map ram info $D000 instead of rom

class CWilliams2Machine:public CWilliamsMachine
{
protected:
	u8 MainROM2[0x50000];
	u8 SoundROM2[0x70000];
	u8 VROM[0xC000];
	u8 TileRAM[0x800];
	u8 BonusRAM[0x1000];					//extra ram for inferno/mysticm
public:
	CWilliams2Machine();
	virtual ~CWilliams2Machine();
	virtual int Init();
	virtual void Reset();
	virtual void Line(u32 mainc,u32 soundc,int irq);
	virtual void SaveState(CState *s);
	virtual void LoadState(CState *s);
	static u8 ReadMainCPU(void *user,u32 addr);
	static void WriteMainCPU(void *user,u32 addr,u8 data);
	static void PIA1_OutputB(void *user,u8 data);
	static void PIA1_OutputCB2(void *user,u8 data);
	static void PIA2_OutputA(void *user,u8 data);
	static void PIA2_OutputCA2(void *user,u8 data);
};
